-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update for Cadence integration for atree inlining and deduplication #352
Update for Cadence integration for atree inlining and deduplication #352
Conversation
Some errors that should be returned as external error are being returned as fatal error. This caused a problem that was detected during Cadence integration. This commit resolves the problem by returning these fatal errors as external errors.
Some errors that should be returned as external error are being returned as fatal error. This caused a problem that was detected during Cadence integration. This commit resolves the problem by returning these fatal errors as external errors.
Cadence integration requires InlinedExtraData interface.
ContainerStorable interface supports encoding container storable (storable containing other storables) as element. This is needed for integration with Cadence.
This is needed for integration with Cadence because map key can be Cadence enums.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## fxamacker/add-composite-type-to-smoke-test #352 +/- ##
==============================================================================
+ Coverage 62.56% 62.58% +0.01%
==============================================================================
Files 15 15
Lines 10566 10602 +36
==============================================================================
+ Hits 6611 6635 +24
- Misses 3010 3016 +6
- Partials 945 951 +6
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, LGTM!
Just one question regarding verification of inlined containers (arrays and maps), but not a blocker for this PR
// Skip verification of inlined array serialization. | ||
if a.Inlined() { | ||
return nil | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are inlined arrays verified somewhere else? If this skips verification of them in general, maybe it would be good to add that too, just to be safe (maybe just in a follow-up PR, not a blocker)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are inlined arrays verified somewhere else?
Yes, inlined arrays and maps are verified when their parent is verified. The serialization verification is done at slab level so round-trip serialization is tested, as well as elements in the slabs.
// Skip verification of inlined map serialization. | ||
if m.Inlined() { | ||
return nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above for array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
81a8e2d
into
fxamacker/add-composite-type-to-smoke-test
Closes #351
Updates #292 onflow/cadence#2809 onflow/flow-go#1744
This PR adds new interfaces, changes error types, exports new functions, etc. This is to resolve all the integration issues integration issues I ran into while updating onflow/cadence to use Atree PR #342 and #345.
Changes:
TypeInfo.ID()
toTypeInfo.Identifier()
InlinedExtraData
interfaceContainerStorable
interfaceEncode
toEncodeSlab
EncodeStorableAsElement()
ContainerStorable.HasPointer()
main
branchFiles changed
in the Github PR explorer